package bupt.party.online.service;

import java.util.List;

import bupt.party.online.model.Branch;
import bupt.party.online.model.PartyNews;

public interface IBranchService {
	public Branch findBranchById(int id);
	public List<Branch> findChildBranchesById(int id);
	public List<Branch> findParentBranches();
	public boolean addBranch(Branch branch);
	public boolean deleteBranch(String branchname);
	public boolean updateBranch(Branch branch);
	public boolean deleteBranchById(int id);//根据支部id级联删除,不提供一级节点删除
	public List<Branch> findAllBranch();
	public String getBranchName(int id);
	public List<Branch> getNewsByCategory(int id, int pageNow,int pageSize);
	public int getResultCountByTag(int id);//获得id支部下所有支部数
	public int getResultCount();//获得所有支部数
	public Branch getParentBranchById(int id);
	public List<Branch> getBranchlevel3(int id);//获得3级支部
	public boolean checkName(String name);//查看branch有没有这个name
	
	public String getPageCode4BranchTree(boolean isFrontPage);
	
	public void getNodeChildrenBranches(Branch parentBranch,List<Branch> result);
	
	public List<Branch> getBranchLevel2();//获得3级支部
}
